Skip to main content

All Questions

5votes
4answers
641views

Processing a 2D matrix - need to speed up my O(n^4) algorithm

I have an n x n matrix which I need to convert into a list sorted by value. Starting with the maximum value cell at (row x1, col y1), I must immediately exclude all cells where (x >= x1, y <= y1)...
Irfan434's user avatar
0votes
2answers
341views

(AI) algorithm to optimize input parameters

Background information I am building a program that plays checkers as good as possible. It already plays pretty well but the goal is to improve it even more. This can be done by adding new methods to ...
Stan Callewaert's user avatar
2votes
2answers
3kviews

Efficiency considerations: nested loop vs recursion

I would consider myself an intermediate Python programmer. One of my recent challenges was creating a list of all possible solutions to a given Countdown problem. Without getting into too much detail,...
IliaK's user avatar
0votes
1answer
336views

Optimal Simplification of Transposition Products

I am looking to take a product of a large number of transpositions, and boil it down to a smaller number of products. I have the following code, and would like some input on efficient ways to boil ...
Santana Afton's user avatar
0votes
2answers
759views

How fast should a Python factoring script be?

Just how efficient is "good enough" for all intents and purposes? I wrote a script to simply list off all numbers that divide into an input, x, as pairs (i, n//i) and was just curious how efficient I ...
Plopperzz's user avatar

close